﻿using Company.IO.Interfaces;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Company.System.IO.IntegrationTests
{
    public partial class DirectoryTest : TestBase<IDirectory>
    {
        private const string _SGetParentMethodName = "GetParent";

        [TestMethod]
        public void GetParent_PathValid_Parent()
        {
            //Arrange
            string path = SLocalPath;
            var expected = new DirectoryInfo(global::System.IO.Directory.GetParent(path));

            //Act
            IDirectoryInfo actual = Directory.GetParent(path);

            //Assert
            Assert.AreEqual(expected, actual);
        }


        [TestMethod]
        public void GetParent_PathNull_ArgumentNullException()
        {
            PathNull_ArgumentNullException(_SGetParentMethodName);
        }

        [TestMethod]
        public void GetParent_PathEmpty_ArgumentException()
        {
            PathEmpty_ArgumentException(_SGetParentMethodName);
        }
    }
}